#include "gameover.h"
#include "ui_gameover.h"
#include<QLabel>
#include<QFont>
#include<QPainter>
gameover::gameover(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::gameover)
{
    ui->setupUi(this);
}
void gameover::paintEvent(QPaintEvent *event){

    QPainter painter(this);
    //显示分数
    QFont font3("宋体",20);
    painter.setFont(font3);
    painter.setPen(Qt::white);
    painter.setBrush(Qt::white);
    painter.drawText(200,160,"GAME OVER");
    QFont font2("宋体",17);
    painter.setFont(font2);
    painter.setPen(Qt::black);
    painter.setBrush(Qt::black);
    painter.drawText(200,195,"score:");
    painter.drawText(280,195,QString::number(score+10));
}
gameover::~gameover()
{
    delete ui;
}
